package org.example.erat.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 统计数据传输对象
 */
public class StatisticsDTO {

    /**
     * 实验维度统计
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ExperimentStatistics {
        private Long experimentId;
        private String experimentName;
        private Integer totalStudents;
        private Integer submittedCount;
        private Integer missingCount;
        private Double submissionRate;
        private List<StudentDTO> missingStudents;
    }

    /**
     * 学生维度统计
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class StudentStatistics {
        private Long studentId;
        private String studentName;
        private Integer totalExperiments;
        private Integer submittedCount;
        private Integer missingCount;
        private Double submissionRate;
        private List<ExperimentDTO> missingExperiments;
    }

    /**
     * 可视化统计数据
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class VisualizationData {
        private List<String> experimentNames;
        private List<Double> submissionRates;
    }
}
